<script setup>
</script>
<template>
  <el-container>
    <el-header>
      <el-span class="main-left">后台管理系统</el-span>
      <el-button type="info" @click="quit" title="注销" class="tuichu"></el-button>
      </el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="1-4-1"
          class="el-menu-vertical-demo"
          :router="true"
        >
          <el-menu-item index="/main/user">用户管理</el-menu-item>
          <el-menu-item index="/main/category">商品类别</el-menu-item>
          <el-menu-item index="/main/product">商品</el-menu-item>
          <el-menu-item index="/main/orders">订单管理</el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  methods:{
    quit:function(){
      window.sessionStorage.clear();
      this.$router.push("/");
      this.$message.success("退出成功")
    }
  }
}
</script>

<style>
.el-header {
  color: white;
  font-size: xx-large;
  padding-top:20px;
  padding-left:40px;
  background-color: #122c4d;
  height: 10vh;

}
.tuichu{
  float:right;
  background-image: url(../assets/3.png);
  background-size: contain;
}
.el-footer {
  background-color: #b3c0d1;
  height: 10vh;
}


.el-aside {
  background-color: #d3dde7;
  height: 90vh;
}

.el-main {
  background-color: #e9eef3;
}
</style>
